#include <fstream>
#include <string>
#include "big_int.h"

int main()
{
	std::ifstream is("in.txt");
	std::ofstream os("out.txt");

	big_int b1, b2;

	while (is >> b1 >> b2)
	{
		if (b2 == 0)
		{
			os << "<error>\n\n\n";
		}
		else
		{
			std::pair<big_int, big_int> num = b1 / b2;
			os << num.first << "\n" << num.second << "\n\n";
		}
	}
	return 0;
}